<?php
    if ($_POST['email'] and $_POST['pass']) {
        mysql_connect("Localhost", "root", "beep") or die(mysql_error());
        mysql_select_db("test") or die(mysql_error());
        if (mysql_query("INSERT INTO users (id, login, password) VALUES ('', '".$_POST['email']."', '".sha1($_POST['pass'])."')")) {
            echo 'ok';
        } else {
            echo 'nok';
        }
        mysql_close();
    }
?>